package com.mayuanfei.controller;

import com.mayuanfei.pojo.OrderBo;
import com.mayuanfei.service.RemoteRetryService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO 类描述
 *
 * @author 老马
 * @date 2025-04-07 13:48
 */
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/remote")
public class RemoteRetryController {
    private final RemoteRetryService remoteRetryService;
    @RequestMapping("/retry")
    public void localRetry(String params) {
        remoteRetryService.remoteRetry(params);
    }

    @RequestMapping("/retryNoException")
    public void localNoException(String params) {
        remoteRetryService.remoteRetryNoException(params);
    }

    @RequestMapping("/retryIncludeException")
    public void localRetryIncludeException(String params) {
        remoteRetryService.remoteRetryIncludeException(params);
    }

    @RequestMapping("/retryExcludeException")
    public void localRetryExcludeException(String params) {
        remoteRetryService.remoteRetryExcludeException(params);
    }

    @RequestMapping("/retryPropagation")
    public void remoteRetryPropagation(String params) {
        remoteRetryService.remoteRetryPropagation(params);
    }

    @RequestMapping("/retryCompleteCallback")
    public void remoteRetryCompleteCallback(String params) {
        remoteRetryService.remoteRetryCompleteCallback(params);
    }

    @PostMapping("/retryBizNo")
    public void remoteRetryBizNo(@RequestBody OrderBo request) {
        remoteRetryService.remoteRetryBizNo(request);
    }
}